package com.mk.eventbus;

/**
 * Created by mk on 2017/9/13.
 */

public class AsyThreadHandler {
    private EventBus eventBus;

    public AsyThreadHandler(EventBus eventBus) {
        this.eventBus = eventBus;
    }

    public void post(final Subscription subscription,final  Object event){
        new Thread(){
            @Override
            public void run() {
                eventBus.invoke(subscription,event,subscription.subscroptionMethod.method);
            }
        }.start();
    }
}
